package icu.xuyijie.springbootlearning2.chapter4.async;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 徐一杰
 * @date 2025/03/07 10:44
 * @description
 */
@RestController
@RequestMapping("/async")
public class AsyncTestController {

    @Autowired
    private AsyncTest asyncTest;

    @GetMapping("/a")
    public void test() {
        asyncTest.method1();
        System.out.println(Thread.currentThread().getName() + "主线程执行完毕");
    }

}
